﻿// Accord Math Library
// The Accord.NET Framework
// http://accord-framework.net
//
// Copyright © César Souza, 2009-2017
// cesarsouza at gmail.com
//
//    This library is free software; you can redistribute it and/or
//    modify it under the terms of the GNU Lesser General Public
//    License as published by the Free Software Foundation; either
//    version 2.1 of the License, or (at your option) any later version.
//
//    This library is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//    Lesser General Public License for more details.
//
//    You should have received a copy of the GNU Lesser General Public
//    License along with this library; if not, write to the Free Software
//    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//

// ======================================================================
// This code has been generated by a tool; do not edit manually. Instead,
// edit the T4 template Matrix.Comparisons.tt so this file can be regenerated. 
// ======================================================================

namespace Accord.Math
{
    using System;
    using System.CodeDom.Compiler;
    using Accord.Math;
    using System.Runtime.CompilerServices;

    public static partial class Elementwise
    {
        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Int32[] b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (Int32* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[,] a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32 a, Int32[] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32 a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32 a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Int16[] b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Int16[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (Int16* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[,] a, Int16[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int16[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int16[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Int16 b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Int16 b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int16 b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32 a, Int16[] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32 a, Int16[,] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32 a, Int16[][] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Single[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (Single* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[,] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32 a, Single[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32 a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32 a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Double[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (Double* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[,] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32 a, Double[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32 a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32 a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (Int64* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[,] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32 a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32 a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32 a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (Decimal* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[,] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32 a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32 a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32 a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Byte[] b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Byte[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (Byte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[,] a, Byte[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Byte[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Byte[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, Byte b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, Byte b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, Byte b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32 a, Byte[] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32 a, Byte[,] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32 a, Byte[][] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, sbyte[] b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, sbyte[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (sbyte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[,] a, sbyte[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, sbyte[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, sbyte[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32[] a, sbyte b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32[,] a, sbyte b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int32,bool>(a);

            unsafe
            {
                fixed (Int32* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32[][] a, sbyte b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int32,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int32 a, sbyte[] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int32 a, sbyte[,] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int32 a, sbyte[][] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Int32[] b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (Int32* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[,] a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16 a, Int32[] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16 a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16 a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Int16[] b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (Int16* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[,] a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16 a, Int16[] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16 a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16 a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Single[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (Single* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[,] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16 a, Single[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16 a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16 a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Double[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (Double* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[,] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16 a, Double[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16 a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16 a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (Int64* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[,] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16 a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16 a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16 a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (Decimal* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[,] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16 a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16 a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16 a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Byte[] b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Byte[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (Byte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[,] a, Byte[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Byte[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Byte[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, Byte b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, Byte b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, Byte b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16 a, Byte[] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16 a, Byte[,] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16 a, Byte[][] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, sbyte[] b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, sbyte[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (sbyte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[,] a, sbyte[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, sbyte[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, sbyte[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16[] a, sbyte b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16[,] a, sbyte b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int16,bool>(a);

            unsafe
            {
                fixed (Int16* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16[][] a, sbyte b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int16,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int16 a, sbyte[] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int16 a, sbyte[,] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int16 a, sbyte[][] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Int32[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Int32[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (Int32* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[,] a, Int32[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int32[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int32[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Int32 b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Int32 b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int32 b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single a, Int32[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single a, Int32[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single a, Int32[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Int16[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Int16[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (Int16* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[,] a, Int16[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int16[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int16[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Int16 b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Int16 b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int16 b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single a, Int16[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single a, Int16[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single a, Int16[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Single[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (Single* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[,] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single a, Single[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Double[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (Double* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[,] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Single.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single a, Double[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Int64[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Int64[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (Int64* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[,] a, Int64[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int64[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int64[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Int64 b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Int64 b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Int64 b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single a, Int64[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single a, Int64[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single a, Int64[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (Decimal* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[,] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Byte[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Byte[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (Byte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[,] a, Byte[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Byte[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Byte[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, Byte b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, Byte b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, Byte b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single a, Byte[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single a, Byte[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single a, Byte[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, sbyte[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, sbyte[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (sbyte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[,] a, sbyte[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, sbyte[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, sbyte[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single[] a, sbyte b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(A))
{ r[i] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single[,] a, sbyte b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Single,bool>(a);

            unsafe
            {
                fixed (Single* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single[][] a, sbyte b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Single,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Single a, sbyte[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Single a, sbyte[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Single a, sbyte[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Int32[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Int32[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (Int32* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[,] a, Int32[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int32[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int32[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Int32 b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Int32 b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int32 b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double a, Int32[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double a, Int32[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double a, Int32[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Int16[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Int16[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (Int16* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[,] a, Int16[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int16[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int16[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Int16 b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Int16 b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int16 b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double a, Int16[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double a, Int16[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double a, Int16[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Single[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Single[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (Single* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[,] a, Single[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Single[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Single[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Single b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Single b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Single b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A) && Single.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Single.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Single.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double a, Single[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double a, Single[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double a, Single[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Double[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (Double* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[,] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ ptrR[i] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A) && Double.IsNaN(B))
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A) ^ Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsPositiveInfinity(A) ^ Double.IsPositiveInfinity(B))
{ r[i][j] = false; continue; }
    if (Double.IsNegativeInfinity(A) ^ Double.IsNegativeInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double a, Double[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Int64[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Int64[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (Int64* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[,] a, Int64[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int64[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int64[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Int64 b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Int64 b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Int64 b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double a, Int64[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double a, Int64[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double a, Int64[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (Decimal* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[,] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Byte[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Byte[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (Byte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[,] a, Byte[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Byte[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Byte[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, Byte b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, Byte b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, Byte b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double a, Byte[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double a, Byte[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double a, Byte[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, sbyte[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, sbyte[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (sbyte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[,] a, sbyte[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, sbyte[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, sbyte[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double[] a, sbyte b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(A))
{ r[i] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double[,] a, sbyte b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Double,bool>(a);

            unsafe
            {
                fixed (Double* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(A))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(A))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double[][] a, sbyte b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Double,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(A))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(A))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Double a, sbyte[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Double a, sbyte[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Double a, sbyte[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Int32[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Int32[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (Int32* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[,] a, Int32[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int32[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int32[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Int32 b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Int32 b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int32 b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64 a, Int32[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64 a, Int32[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64 a, Int32[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Int16[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Int16[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (Int16* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[,] a, Int16[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int16[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int16[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Int16 b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Int16 b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int16 b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64 a, Int16[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64 a, Int16[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64 a, Int16[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Single[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (Single* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[,] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64 a, Single[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64 a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64 a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Double[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (Double* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[,] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64 a, Double[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64 a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64 a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (Int64* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[,] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64 a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64 a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64 a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (Decimal* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[,] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64 a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64 a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64 a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Byte[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Byte[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (Byte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[,] a, Byte[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Byte[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Byte[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, Byte b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, Byte b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, Byte b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64 a, Byte[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64 a, Byte[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64 a, Byte[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, sbyte[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, sbyte[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (sbyte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[,] a, sbyte[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, sbyte[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, sbyte[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64[] a, sbyte b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64[,] a, sbyte b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Int64,bool>(a);

            unsafe
            {
                fixed (Int64* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64[][] a, sbyte b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Int64,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Int64 a, sbyte[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Int64 a, sbyte[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Int64 a, sbyte[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Int32[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Int32[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (Int32* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[,] a, Int32[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int32[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int32[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Int32 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Int32 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int32 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal a, Int32[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal a, Int32[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal a, Int32[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Int16[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Int16[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (Int16* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[,] a, Int16[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int16[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int16[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Int16 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Int16 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int16 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal a, Int16[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal a, Int16[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal a, Int16[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Single[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Single[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (Single* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[,] a, Single[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Single[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Single[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Single b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Single b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Single b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal a, Single[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal a, Single[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal a, Single[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Double[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Double[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (Double* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[,] a, Double[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Double[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Double[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Double b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Double b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Double b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal a, Double[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal a, Double[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal a, Double[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Int64[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Int64[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (Int64* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[,] a, Int64[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int64[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int64[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Int64 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Int64 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Int64 b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal a, Int64[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal a, Int64[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal a, Int64[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (Decimal* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[,] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Byte[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Byte[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (Byte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[,] a, Byte[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Byte[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Byte[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, Byte b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, Byte b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, Byte b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal a, Byte[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal a, Byte[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal a, Byte[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, sbyte[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, sbyte[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (sbyte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[,] a, sbyte[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, sbyte[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, sbyte[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal[] a, sbyte b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal[,] a, sbyte b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Decimal,bool>(a);

            unsafe
            {
                fixed (Decimal* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal[][] a, sbyte b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Decimal,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Decimal a, sbyte[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Decimal a, sbyte[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Decimal a, sbyte[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Int32[] b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (Int32* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[,] a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte a, Int32[] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Int16[] b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (Int16* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[,] a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte a, Int16[] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Single[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (Single* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[,] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte a, Single[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Double[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (Double* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[,] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte a, Double[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (Int64* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[,] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (Decimal* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[,] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Byte[] b, Byte atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Byte[,] b, Byte atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (Byte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[,] a, Byte[][] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Byte[,] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Byte[][] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, Byte b, Byte atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, Byte b, Byte atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, Byte b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte a, Byte[] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte a, Byte[,] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte a, Byte[][] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, sbyte[] b, Byte atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, sbyte[,] b, Byte atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (sbyte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[,] a, sbyte[][] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, sbyte[,] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, sbyte[][] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte[] a, sbyte b, Byte atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte[,] a, sbyte b, Byte atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<Byte,bool>(a);

            unsafe
            {
                fixed (Byte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte[][] a, sbyte b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<Byte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(Byte a, sbyte[] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(Byte a, sbyte[,] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(Byte a, sbyte[][] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Int32[] b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (Int32* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[,] a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int32 b, Int32 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte a, Int32[] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte a, Int32[,] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte a, Int32[][] b, Int32 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Int16[] b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (Int16* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[,] a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int16 b, Int16 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte a, Int16[] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte a, Int16[,] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte a, Int16[][] b, Int16 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Single[] b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (Single* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[,] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Single.IsNaN(B))
{ r[i] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Single.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Single.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Single b, Single atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Single.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Single.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte a, Single[] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte a, Single[,] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte a, Single[][] b, Single atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Double[] b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (Double* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[,] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (Double.IsNaN(B))
{ r[i] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i] = false; continue; }
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (Double.IsNaN(B))
{ ptrR[i] = false; continue; }
    if (Double.IsInfinity(B))
{ ptrR[i] = false; continue; }
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Double b, Double atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (Double.IsNaN(B))
{ r[i][j] = false; continue; }
    if (Double.IsInfinity(B))
{ r[i][j] = false; continue; }
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte a, Double[] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte a, Double[,] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte a, Double[][] b, Double atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (Int64* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[,] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Int64 b, Int64 atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte a, Int64[] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte a, Int64[,] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte a, Int64[][] b, Int64 atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (Decimal* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[,] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = (decimal)a[i, j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i] = true; continue; }
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)a[i];
    var B = (decimal)b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ ptrR[i] = true; continue; }
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = (decimal)ptrA[i];
    var B = (decimal)b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Decimal b, Decimal atol = 0, Decimal rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    decimal C = (decimal)A;
    decimal D = (decimal)B;
    if (C == D)
{ r[i][j] = true; continue; }
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = (decimal)a[i][j];
    var B = (decimal)b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte a, Decimal[] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte a, Decimal[,] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte a, Decimal[][] b, Decimal atol = 0, Decimal rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Byte[] b, Byte atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Byte[,] b, Byte atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (Byte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[,] a, Byte[][] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Byte[,] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Byte[][] b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, Byte b, Byte atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, Byte b, Byte atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, Byte b, Byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte a, Byte[] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte a, Byte[,] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte a, Byte[][] b, Byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, sbyte[] b, byte atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b[i];
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, sbyte[,] b, byte atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (sbyte* ptrB = b)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = ptrB[i];
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[,] a, sbyte[][] b, byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < b.Length; i++)
                    for (int j = 0; j < b[i].Length; j++)
{
    var A = a[i, j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, sbyte[,] b, byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i, j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, sbyte[][] b, byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b[i][j];
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }










        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte[] a, sbyte b, byte atol = 0, Double rtol = 0)
        {
bool[] r = VectorCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i] = true; continue; }
    }

{ r[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
    if (A == B)
{ r[i] = true; continue; }
    var C = A;
    var D = B;
{ r[i] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
{
    var A = a[i];
    var B = b;
{ r[i] = (A == B); continue; }
}

            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte[,] a, sbyte b, byte atol = 0, Double rtol = 0)
        {
bool[,] r = MatrixCreateAs<sbyte,bool>(a);

            unsafe
            {
                fixed (sbyte* ptrA = a)
                fixed (bool* ptrR = r)
                {
                    if (rtol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ ptrR[i] = true; continue; }
    }

{ ptrR[i] = (delta <= Math.Abs(C) * rtol); continue; }
}

                    }
                    else if (atol > 0)
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
    if (A == B)
{ ptrR[i] = true; continue; }
    var C = A;
    var D = B;
{ ptrR[i] = (Math.Abs(C - D) <= atol); continue; }
}

                    }
                    else
                    {
                        for (int i = 0; i < a.Length; i++)
{
    var A = ptrA[i];
    var B = b;
{ ptrR[i] = (A == B); continue; }
}

                    }
                }
            }

            return r;
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte[][] a, sbyte b, byte atol = 0, Double rtol = 0)
        {
bool[][] r = JaggedCreateAs<sbyte,bool>(a);

            if (rtol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
    var delta = Math.Abs(C - D);
    if (C == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }
    else if (D == 0)
    {
        if (delta <= rtol)
{ r[i][j] = true; continue; }
    }

{ r[i][j] = (delta <= Math.Abs(C) * rtol); continue; }
}


            }
            else if (atol > 0)
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
    if (A == B)
{ r[i][j] = true; continue; }
    var C = A;
    var D = B;
{ r[i][j] = (Math.Abs(C - D) <= atol); continue; }
}

            }
            else
            {
                for (int i = 0; i < a.Length; i++)
                    for (int j = 0; j < a[i].Length; j++)
{
    var A = a[i][j];
    var B = b;
{ r[i][j] = (A == B); continue; }
}

            }

            return r;
        }



















        /// <summary>
        ///   Determines whether two vectors contain the same values.
        /// </summary>
        /// 
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[] Equals(sbyte a, sbyte[] b, byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[,] Equals(sbyte a, sbyte[,] b, byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

        /// <summary>
        ///   Determines whether two matrices contain the same values.
        /// </summary>
        ///
#if NET45 || NET46 || NET462 || NETSTANDARD2_0
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
        public static bool[][] Equals(sbyte a, sbyte[][] b, byte atol = 0, Double rtol = 0)
        {
            return Equals(b, a, rtol, atol);
        }

    }
}